package com.shop.cereshop.business.dao.distributor;

import com.shop.cereshop.business.page.distribution.DistributoLevel;
import com.shop.cereshop.commons.domain.distributor.CereShopDistributionLevel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CereShopDistributionLevelDAO {
    int deleteByPrimaryKey(Long distributorLevelId);

    int insert(CereShopDistributionLevel record);

    int insertSelective(CereShopDistributionLevel record);

    CereShopDistributionLevel selectByPrimaryKey(Long distributorLevelId);

    int updateByPrimaryKeySelective(CereShopDistributionLevel record);

    int updateByPrimaryKey(CereShopDistributionLevel record);

    List<CereShopDistributionLevel> getAllLevel(@Param("shopId") Long shopId);

    DistributoLevel getById(@Param("distributorLevelId") Long distributorLevelId);

    List<CereShopDistributionLevel> getAll(@Param("shopId") Long shopId);

    CereShopDistributionLevel findSuperior(CereShopDistributionLevel level);

    void updateIfSelf(@Param("ifSelf") Integer ifSelf,@Param("time") String time);
}